import java.util.Scanner;

/**
 * Created by Mr.no.
 * User:yangyun
 * Date:2017/8/29
 * Time:20:57
 */
public class Test {
    public static  void main(String[] args){
        Scanner scanner=new Scanner(System.in);
        int x=scanner.nextInt();
        int m = 0;
        int n = 0;
        while (x>5){
            if (x%3==0||x%4==0){
                if (x%3==0){
                     n=x/3;
                     m=0;
                }
                if (x%4==0){
                     n=0;
                     m=x/4;
                }
            }else {
                n = x % 4 / 3;
                m = x / 4;
            }
            System.out.println(n+" "+m);
            break;
        }

    }

}
